# $Id: PKGBUILD 165285 2012-08-14 20:44:40Z ronald $
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>

pkgname=net-tools
pkgver=1.60.20120804git
pkgrel=2
pkgdesc="Configuration tools for Linux networking"
arch=(i686 x86_64)
license=('GPL2')
url="http://net-tools.sourceforge.net/"
depends=('glibc')

# http://www.tazenda.demon.co.uk/phil/$pkgname/$pkgname-$pkgver.tar.bz2
# use git checkout instead
source=(ftp://ftp.archlinux.org/other/${pkgname}/${pkgname}-${pkgver}.tar.xz
	Makefile.patch)
options=(!makeflags)
install=net-tools.install
sha1sums=('a3341086cb403a8d747b783693f72ee2dfd72d82'
          '4191ca56dc01d6aebe26c36c7cc060c638d5ebca')
build() {
  cd ${srcdir}/${pkgname}-${pkgver}
  patch -Np0 -i ${srcdir}/Makefile.patch
  yes "" | make
}

package() {
  cd ${srcdir}/${pkgname}-${pkgver}
  make BASEDIR=${pkgdir} update

  # the following is provided by yp-tools
  rm "${pkgdir}"/bin/{nis,yp}domainname
  rm "${pkgdir}"/usr/share/man/man1/{nis,yp}domainname.1

  # hostname is provided by inetutils
  rm "${pkgdir}"/bin/{hostname,dnsdomainname,domainname}
  rm -rf "${pkgdir}"/usr/share/man/man1
}
